﻿\newcommand{\dopsalm}[1]{%
% 1 - number 1-5
\edef\antnum{\numbertoword{1}}
\edef\nextnum{\numberplusonetoword{1}}
{%
\expandafter\def\csname psalm\antnum afterant\endcsname{T}
\ifx\csname psalm\antnum beforeant\endcsname\undefined\else\if\csname psalm\antnum beforeant\endcsname T%
\vspace{0pt minus 14pt} % was 8pt
\begin{center}{\Large \csname psalm\antnum\endcsname}\end{center}
\vspace{0pt minus 18pt} % was 12pt
\expandafter\def\csname psalm\antnum afterant\endcsname{F}
\fi\fi
%\bigskip % this was used for psalm 1
\def\greinitialformat##1{%
{\fontsize{\csname ant\antnum initialsize\endcsname}{\csname ant\antnum initialsize\endcsname}\selectfont ##1}%
}
\csname preant\antnum\endcsname
\edef\annot{\small{#1. Ant.}}
\expandafter\edef\csname annot\antnum\endcsname{\small{\csname ant\antnum linetwo\endcsname}}
\setinitialspacing{\csname ant\antnum initial\endcsname}

\includescore{\csname ant\antnum tex\endcsname}
\if\csname psalm\antnum afterant\endcsname T%
\translation[]{\normalsize \csname ant\antnum translation\endcsname}
\vspace{0pt minus 12pt} % this had been 8pt, but 1ex in psalm 1
\begin{center}{\Large \csname psalm\antnum\endcsname}\end{center}
\vspace{0pt minus 12pt}
\fi
\csname prepsalm\antnum\endcsname
\includescore{\csname psalm\antnum tex\endcsname}
}
\normalsize

%
} \newcommand{\dontdothis}[1]{
%
%\medskip
\setlength{\columnsep}{18pt}
\setlength{\columnseprule}{.4pt}
\csname beginpsalm\antnum cols\endcsname
\colchunk{\vspace{-12pt}%
\begin{psalmverses}[\ifx\csname psalm\antnum beginversetwo\endcsname\undefined 1\else\if\csname psalm\antnum beginversetwo\endcsname T2\else 1\fi\fi]
\input{\csname psalm\antnum versestex\endcsname}
\end{psalmverses}
}
%
\selectlanguage{american}
\colchunk{\vspace{-12pt}%
\sloppy
\begin{psalmverses}[0]
\input{\csname psalm\antnum translationtex\endcsname}
\end{psalmverses}
}
\selectlanguage{latin}
\csname endpsalm\antnum cols\endcsname
\medskip

\ifx\csname preant\antnum two\endcsname\undefined
{\noindent\emph{Repeat antiphon.}\\ \vspace{0ex minus 1ex}}
\else
{\csname preant\antnum two\endcsname
\edef\greinitialformat##1{%
{\fontsize{\csname ant\antnum fontsizetwo\endcsname}{\csname ant\antnum fontsizetwo\endcsname}\selectfont ##1}%
}
\edef\annot{\small{#1 Ant.}}
\edef\annottwo{\small{\csname ant\antnum linetwo\endcsname}}
\setinitialspacing{\csname ant\antnum initial\endcsname}

\includescore{\csname ant\antnum tex\endcsname}}%
\fi
% straighten all this stuff out -- needs to default to page break after psalm
% check nopagebreakbeforepsalm - if undefined, check pagebreakafterpsalm - if undefined, pagebreak
\ifx\csname nopagebreakbeforepsalm\nextnum\endcsname\undefined
  \ifx\csname pagebreakafterpsalm\antnum\endcsname\undefined
    \expandafter\def\csname pagebreakafterpsalm\antnum\endcsname{T}
  \fi
\else %nopagebreakbeforepsalm is defined
  \if\csname nopagebreakbeforepsalm\nextnum\endcsname T%
    \expandafter\def\csname pagebreakafterpsalm\antnum\endcsname{F}
  \else
    \expandafter\def\csname pagebreakafterpsalm\antnum\endcsname{T}
  \fi
\fi
\expandafter\def\csname nopagebreakafterpsalm\antnum\endcsname{T}
\ifx\csname pagebreakafterpsalm\antnum\endcsname\undefined\else\if\csname pagebreakafterpsalm\antnum\endcsname T%
\vspace*{-20pt}
\pagebreak
\expandafter\def\csname nopagebreakafterpsalm\antnum\endcsname{F}
\fi\fi
\if\csname nopagebreakafterpsalm\antnum\endcsname T%
\vspace{1ex plus 1.5ex minus 0.5ex}
\hrule
\vspace{0pt plus 1.5ex minus 0ex}
\fi

%\ifx\csname nopagebreakbeforepsalm\nextnum\endcsname\undefined
%\pagebreak%
%\else\if\csname nopagebreakbeforepsalm\nextnum\endcsname T%
%\medskip\hrule%
%\else%
%\pagebreak%
%\fi\fi
%\medskip
}